The present invention relates to a virtual computer, and in particular, to a virtual computer system effecting hardware resource control to process a change-over operation between a host and a guest.
In a virtual computer, there are defined a host resource and a guest resource in the architecture thereof. In general, these resources are implemented in the duplicated configuration. In order to share control of instruction execution (for example, of a microprogram) between the host and the guest, it is necessary for the host and guest to access these duplicated resources according to the same access method. For example, in a virtual computer system in which a control register (CR) is stored at address A of a local storage, when the address A is specified, it is necessary that a CR for the host be read in the host mode and that a CR for the guest be read in the guest mode.
In the conventional virtual computer, in order to provide the same access method for the host and guest to access the duplicated resources, at a change-over from the host to the guest, the host resource is moved from an area (to be referred to as an access area) to be accessed from a microprogram to a save area and then the guest resource is set to the access area, whereas at a change-over from the guest to the host, the host resource is restored from the save area to the access area.
Incidentally, a virtual computer of this kind has been described in U.S. Pat. No. 4456954.
According to the prior art, as described above, in order to provide the same access method for the host and the guest to access the duplicated resources, there exists a problem that a considerable overhead is required for the operations to save and to restore the host resource at the change-over processing between the host and guest.